package ia;

import java.awt.Color;
import java.awt.Graphics;
import java.io.Serializable;
import java.util.ArrayList;

import utils.Vector2d;

import graphics.DebugDrawable;



public class Checkpoint implements DebugDrawable, Serializable {
	private static final long serialVersionUID = 1L;
	public Vector2d coord;
	private ArrayList<Link> links;
	
	
	public Checkpoint(Vector2d coord) {
		this.coord = coord;
		links = new ArrayList<Link>();
	}
	
	public Checkpoint(float x, float y) {
		coord = new Vector2d(x, y);
		links = new ArrayList<Link>();
	}
	
	
	public void addLink(Link link) {
		links.add(link);
	}
	
	
	public ArrayList<Link> links() {
		return links;
	}
	
	public void drawDebug(Graphics g) {
		g.setColor(Color.YELLOW);
		g.fillOval((int)coord.x - 5, (int)coord.y - 5, 10, 10);
	}
}
